import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { TabsPage } from './tabs.page';
import { ConfigService } from 'src/app/service/config.service';
console.log("----是否第三方-------",ConfigService.is3rd);
const routes: Routes = [
  {
    path: 'tabs', component: TabsPage,children: [
      { path: 'home', children: [{ path: '', loadChildren: '../home/index/index.module#IndexPageModule' }] },
      { path: 'my', children: [{ path: '', loadChildren: '../my/index/index.module#IndexPageModule' }] },
      { path: 'lottery', loadChildren: '../lottery/index/index.module#IndexPageModule' },
      { path: 'report', loadChildren: '../report/index/index.module#IndexPageModule' },
      { path: 'recharge', loadChildren: '../recharge/index/index.module#IndexPageModule' },
      { path: 'index3rd', loadChildren: '../home/index3rd/index3rd.module#Index3rdPageModule' },
      { path: '', redirectTo: (ConfigService.is3rd?'/tabs/index3rd':'/tabs/home'), pathMatch: 'full' }]   
  },
   {
     path: '',redirectTo:(ConfigService.is3rd?'/tabs/index3rd':'/tabs/home') ,pathMatch: 'full'
   },
  {
    path: 't1', loadChildren: "../test/t1/t1.module#T1PageModule"
  },
  // {
  //   path: 't2', loadChildren: "../test/t2/t2.module#T2PageModule"
  // },
  // {
  //   path: 't3',  loadChildren: "../test/t3/t3.module#T3PageModule"
  // },
  // {
  //   path: 't4',  loadChildren: "../test/t4/t4.module#T4PageModule"
  // },
  // {
  //   path: 't5',  loadChildren: "../test/t5/t5.module#T5PageModule"
  // }

];

@NgModule({
  imports: [
    RouterModule.forChild(routes)
  ],
  exports: [RouterModule]
})
export class TabsPageRoutingModule { }
